package com.szeldon.declatest.scenario.declaration;

import org.testng.Assert;
import org.testng.annotations.Test;

import com.szeldon.declatest.declaration.TestsSuiteAttributeTypeEnum;
import com.szeldon.declatest.declaration.TestsSuiteDeclaration;

/**
 * Tests for {@link TestsSuiteDeclaration} class.
 * 
 * @author szeldon
 * 
 */
public class TestsSuiteDeclarationTest {

    @Test
    public void testProperArgs() {
        TestsSuiteDeclaration declaration = new TestsSuiteDeclaration();
        declaration.addTestSuiteAttribute(TestsSuiteAttributeTypeEnum.TEST_SUITE_ID.getText(), "someId");
        declaration.addTestSuiteAttribute(TestsSuiteAttributeTypeEnum.TEST_SUITE_DESCRIPTION.getText(),
                "some description");

        Assert.assertEquals(declaration.getId(), "someId");
        Assert.assertEquals(declaration.getDescription(), "some description");
    }

    @Test(expectedExceptions = IllegalArgumentException.class)
    public void testNotProperArgs() {
        TestsSuiteDeclaration declaration = new TestsSuiteDeclaration();
        declaration.addTestSuiteAttribute(TestsSuiteAttributeTypeEnum.TEST_SUITE_ID.getText(), "some Id");
        declaration.addTestSuiteAttribute(TestsSuiteAttributeTypeEnum.TEST_SUITE_DESCRIPTION.getText(),
                "some description");
    }

}
